#include <sys/time.h>
#include <time.h>
#include "egdebug.h"

void tic(struct timeval *t1)
{
	gettimeofday(t1,NULL);
}

long int tac(struct timeval t1)
{
	struct timeval t2;
	gettimeofday(&t2,NULL);
	return ((t2.tv_sec - t1.tv_sec)) * 1000 + (((double)t2.tv_usec - (double)t1.tv_usec) / (double)1000.0);
}
